﻿using System;
using System.Web.Mvc;
using OneAdmin.Models;
using WebCommon;

namespace OneAdmin.Controllers
{
    using WebCommon.Extensions;

    public class ErrorController : Controller
    {
        //
        // GET: /Error/
        [NonAction]
        public ActionResult Handle(Exception exception)
        {
            
            var ej = new ExJsonReturn(exception);
            //保存日志
            ej.Save( );
            //ej.Url = Url.Action("index", "Error");
            return ej;
        }

        public ActionResult Index()
        {
            Log.WriteLog<Test>("服务器异常");
            return this.Content("服务器异常");
        }
    }
}
